<?php
namespace Teacher\Controller;
use Admin\Controller\AdminbaseController;
class InfoController extends AdminbaseController {
	
	protected $m;
	protected $udr;
	protected $lst;
	
	function _initialize() {
		parent::_initialize();
		$this->m = D('YgclSign');
		$this->udr = D('UsersDistrictRelation');
		$this->lst = D("LessonStudentRelation");
	}
	
    public function index(){
    	
    	$this->uid = $this->curUser['uid'];
    	$cids = $this->udr->where(array('uid'=>$this->uid))->getField('cid',true);
    	if($cids){
    		$m = D('YgclClass');
    		$class = $m->where(array('id'=>array('in',$cids)))->relation(true)->select();
    		$this->datas = $class;
    	}
    	
		$this->display();
    }
}